namespace Repositories.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class updateMoneyDecimal : DbMigration
    {
        public override void Up()
        {
            AlterColumn("dbo.Branch", "GrossMargin", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Branch", "CounterFeeRate", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "Balance", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "Profit", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "Gathering", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "Payment", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "InvoiceSend", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "InvoiceCollect", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.SpecialCapital", "WithHold", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.CollectInvoiceDetail", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Payment", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Payment", "CounterFee", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Debit", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Insurance", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.InsurancePerson", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Express", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Gathering", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Invoice", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 2));
        }
        
        public override void Down()
        {
            AlterColumn("dbo.Invoice", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Gathering", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Express", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.InsurancePerson", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Insurance", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Debit", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Payment", "CounterFee", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Payment", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.CollectInvoiceDetail", "Money", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "WithHold", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "InvoiceCollect", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "InvoiceSend", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "Payment", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "Gathering", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "Profit", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.SpecialCapital", "Balance", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Branch", "CounterFeeRate", c => c.Decimal(nullable: false, precision: 18, scale: 4));
            AlterColumn("dbo.Branch", "GrossMargin", c => c.Decimal(nullable: false, precision: 18, scale: 4));
        }
    }
}
